<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        ul {
            display: flex;
            width: 900px;
            list-style: none;
        }
        li {
            width: 100px;
        }
        p {
            margin-left: 60px;
        }
    </style>
  </head>
  <body>
    <!-- 1. 先准备一个容器 -->
    <div id="app">
        <h3>请选择喜欢的专栏</h3>
        <ul>
            <li v-for="item in list">
                <input type="checkbox" v-model="hobby" :value="item" @click="fn">
                {{item}}</li>
        </ul>
        <p v-for="item in hobby">{{item}}</p>
    </div>
    <!-- 2. 引框架 -->
    <script src="./vue.js"></script>
    <script>
      // 3.初始化vue实例对象
      const vm = new Vue({
        el: "#app",
        data: {
            list:["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
            hobby:[],
            
        },
        methods:{
            fn() {
              
            }
        }
      });
    </script>
  </body>
</html>
